package main

import (
	"CaptchaCluster/server/conf"
	"CaptchaCluster/server/game"
	"CaptchaCluster/server/gate"
	"github.com/name5566/leaf"
	lconf "github.com/name5566/leaf/conf"
	_ "net/http/pprof"
)

func main() {
	// 性能检测
	//runtime.SetMutexProfileFraction(1)
	//runtime.SetBlockProfileRate(1)
	//go func() {
	//	http.ListenAndServe("0.0.0.0:8080", nil)
	//}()

	lconf.LogLevel = conf.Server.LogLevel
	lconf.LogPath = conf.Server.LogPath
	lconf.LogFlag = conf.LogFlag
	lconf.ConsolePort = conf.Server.ConsolePort
	lconf.ProfilePath = conf.Server.ProfilePath

	leaf.Run(
		game.Module,
		gate.Module,
	)
}
